//
//  RecipeCell.m
//  趣·美食
//
//  Created by dllo on 15/9/24.
//  Copyright (c) 2015年 金旭. All rights reserved.
//

#import "RecipeCell.h"


@interface RecipeCell ()

@property (nonatomic, strong) UIImageView *titleImage;
@property (nonatomic, strong) UILabel *label;
@property (nonatomic, assign) BOOL isnight;

@end

@implementation RecipeCell




- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.titleImage = [[UIImageView alloc] init];
        [self.contentView addSubview:self.titleImage];
      
        
        self.label = [[UILabel alloc] init];
        [self.contentView addSubview:self.label];
      
        
        
    }
    return self;
}


- (void)setDeModel:(GFDetialsModel *)deModel {
    if (_deModel != deModel) {
        
        _deModel = deModel;
    }
    
    self.label.text = @"原料与做法";
    self.titleImage.image = [UIImage imageNamed:@"guo"];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.titleImage.frame = CGRectMake(ScreenWidth / 375.0 * 120, ScreenWidth / 375.0 * 10, ScreenWidth / 375.0 * 30, ScreenWidth / 375.0 * 30);
    
    
    CGFloat width = [GFCalculateWidthOrHeigth stringWidth:@"原料与做法" withHeigth:ScreenWidth / 375.0 * 30 withFontDictionary:@{NSFontAttributeName:[UIFont systemFontOfSize:15]}];
    self.label.frame = CGRectMake(ScreenWidth / 375.0 * 160, ScreenWidth / 375.0 * 10, width, ScreenWidth / 375.0 * 30);
    self.label.font = [UIFont systemFontOfSize:15];
    self.label.textColor = [UIColor lightGrayColor];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
